import http from './http'

// 生产报工 API（对应后端 ProductionReportingController 提供的接口）
export const productionReportingApi = {
  // 分页查询（支持条件筛选） GET /productionReporting/page
  getPage(params) {
    return http.get('/produce/productionReporting/page', { params })
  },

  // 详情 GET /productionReporting/{id}
  getById(id) {
    return http.get(`/produce/productionReporting/${id}`)
  },

  // 新增 POST /productionReporting/add
  add(data) {
    return http.post('/produce/productionReporting/add', data)
  },

  // 更新 PUT /productionReporting/update
  update(data) {
    return http.put('/produce/productionReporting/update', data)
  },

  // 删除 DELETE /productionReporting/{id}
  remove(id) {
    return http.delete(`/produce/productionReporting/${id}`)
  },
}

export default productionReportingApi


